<include file="../Public/header"/>


<!-- 中部内容 -->
<div id="content">
	
	<div class="container">
		
		<div class="row">
			<!-- 左边 -->
			<include file="../Public/left"/>
			<!-- 中间 -->
	
			
			<div class="span9">
				
				<h1 class="page-title">
					<i class="icon-signal"></i>
					广告管理					
				</h1>
				
				<div class="stat-container">
										
					<div class="stat-holder">
						<a href="{:U('partner/Buy/addClick')}">						
						<div class="stat">							
							<span>{$click_num}</span>							
							可点击次数						
						</div> <!-- /stat -->	
						</a>					
					</div> <!-- /stat-holder -->
					
					<div class="stat-holder">
						<a href="{:U('partner/Buy/addDay')}" >						
						<div class="stat">							
							<span>{$click_day}</span>							
							可放置天数							
						</div> <!-- /stat -->	
						</a>					
					</div> <!-- /stat-holder -->
					
					<div class="stat-holder">
					<a href="{:U('partner/Advert/index')}">							
						<div class="stat">							
							<span>{$adverts}</span>							
							我的广告							
						</div> <!-- /stat -->
						</a>						
					</div> <!-- /stat-holder -->
					
					<div class="stat-holder">
					<a href="{:U('partner/Advert/advert_online')}">							
						<div class="stat">							
							<span>{$onlink_advert}</span>							
							正在上线的广告							
						</div> <!-- /stat -->	
						</a>					
					</div> <!-- /stat-holder -->
					
				</div> <!-- /stat-container -->
				
			
								<div class="tabbable">
						<ul class="nav nav-tabs">
						
						  <li class="active">
						    <a href="#1" data-toggle="tab">通过的广告</a>
						  </li>
						  <li><a href="#2" data-toggle="tab">未通过的广告</a></li>	
						
						</ul>
						
						<br />
						
							<div class="tab-content">
								<div class="tab-pane active" id="1">
								<div class="widget widget-table">
										
					<div class="widget-header">
						<i class="icon-th-list"></i>
						<h3>通过的广告</h3>
						<a class="btn  btn-primary" style="float:right;margin-top: 8px;margin-right: 10px;" href="{:U('partner/Advert/addAdvert')}">添加广告</a>
					</div> <!-- /widget-header -->
					
					<div class="widget-content">
					
						<table class="table table-striped table-bordered">
							<thead>
								<tr>
									<th>广告编号</th>
									<th>标题</th>
									<th>内容</th>
									<th>是否链接</th>
									<th>链接</th>
									<th>位置</th>
									<th>状态</th>
									<th>操作</th>
								</tr>
							</thead>
							
							<tbody>
							<if condition="$advert_pass">
							
							<volist name="advert_pass" id="vo">
								<tr>
									<td>{$vo.aid}</td>
									<td>{$vo.title}</td>
									<td>{$vo.content}</td>
									
									<if condition="$vo.is_link == 0">
										<td>不是</td>
									<else />
										<td>是</td>
									</if>
									<td>{$vo.link}</td>
									<td>
									<if condition="$vo.is_banner == 0">
										列表
									<else />
										轮播图
									</if>
									</td>
									<td>{$vo.status}</td>
							
									<td class="action-td">
											<a href='{:U("partner/Advert/displayAdvert&aid=$vo[aid]")}' class="btn btn-large btn-warning">
												上线
											</a>
									</td>
									
									
								</tr>
							</volist>
							<else />
							<tr>
							<td colspan="8"> 没有数据 </td>
							</tr>
							
							</if>
							</tbody>
						</table>
					
					</div> <!-- /widget-content -->
					
				</div> <!-- /widget -->
								</div>
								
								<div class="tab-pane" id="2">
									<div class="widget widget-table">
										
					<div class="widget-header">
						<i class="icon-th-list"></i>
						<h3>未通过的广告</h3>
						<a class="btn  btn-primary" style="float:right;margin-top: 8px;margin-right: 10px;" href="{:U('partner/Advert/addAdvert')}">添加广告</a>
					</div> <!-- /widget-header -->
					
					<div class="widget-content">
					
						<table class="table table-striped table-bordered">
							<thead>
								<tr>
									<th>广告编号</th>
									<th>标题</th>
									<th>内容</th>
									<th>是否链接</th>
									<th>链接</th>
									<th>状态</th>
									<th>操作</th>
								</tr>
							</thead>
							
							<tbody>
							<if condition="$advert_unpass">
								<volist name="advert_unpass" id="vo">
								<tr>
									<td>{$vo.aid}</td>
									<td>{$vo.title}</td>
									<td>{$vo.content}</td>
									
									<if condition="$vo.is_link == 0">
										<td>不是</td>
									<else />
										<td>是</td>
									</if>
									<td>{$vo.link}</td>
									
									<if condition="$vo.status == 0">
										<td>审核中</td>
									<else />
										<td>审核不通过</td>
									</if>
									<td class="action-td">
									<if condition="$vo.status == 0">
										<p>等着审核</p>
									<else />
										<a href='{:U("partner/Advert/editAd&aid=$vo[aid]")}' class="btn btn-small ">	
											编辑				
										</a>
										<a href='{:U("partner/Advert/delAd&aid=$vo[aid]")}' class="btn btn-small ">	
											删除				
										</a>
									</if>
								</td>
								</tr>
								</volist>
								<else />
								<tr>
								<td colspan="8"> 没有数据 </td>
								</tr>
								</if>
							</tbody>
						</table>
					
					</div> <!-- /widget-content -->
					
				</div> <!-- /widget -->
								</div>
								
							</div>
						  
						  
						</div>
				
				
				
				
			</div> <!-- /span9 -->
			
		
		</div> <!-- /row -->
		
	</div> <!-- /container -->
	
</div> <!-- /content -->
	<SCRIPT type="text/javascript">
	function a_post(url,aid){
	    event.preventDefault();//使a自带的方法失效，即无法调整到href中的URL(http://www.baidu.com)
	    $.ajax({
	           type: "POST",
	           url: "url地址",
	           contentType:"application/json",
	           data: JSON.stringify({param1:param1,param2:param2}),//参数列表
	           dataType:"json",
	           success: function(result){
	              //请求正确之后的操作
	           },
	           error: function(result){
	              //请求失败之后的操作
	           }
	    });
	}
	
	</SCRIPT>				
<include file="../Public/footer"/>
